package serviceset3

import grails.testing.web.controllers.ControllerUnitTest
import org.springframework.http.HttpMethod
import spock.lang.Specification

class DealControllerSpec extends Specification implements ControllerUnitTest<DealController> {

    def setup() {
    }

    def cleanup() {
    }

    void "test something"() {
        given:
        //def goods = [:], customer = [:]

        when:
        def dealController = new DealController()
        request.method = "POST"
        dealController.save()

        then:
        response.status == 200
        response.contentType == "application/json;charset=UTF-8"
        response.json.content == "succeed"
    }
}